package com.czl.elm.controller;


import com.czl.elm.domain.Food;
import com.czl.elm.service.IFoodService;
import com.czl.elm.util.ActionResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zuoleiChen
 * @since 2021-05-23
 */
@RestController
@RequestMapping("/food")
public class FoodController {

    @Autowired
    private IFoodService foodService;

    @ApiOperation(value = "选择食物的规格选项")
    @GetMapping("/selectSpecifications/{foodid}")
    public ActionResult  selectSpecifications(@PathVariable String foodid){
        Map<String,Integer> result=foodService.selectSpecifications(foodid);
        return ActionResult.success("获取成功",result);
    }





}
